package com.maket.jbxx.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.maket.jbxx.mapper.CpAndSxMapper;
import com.maket.jbxx.domain.CpAndSx;
import com.maket.jbxx.service.ICpAndSxService;

/**
 * 产品与属性Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-07-11
 */
@Service
public class CpAndSxServiceImpl implements ICpAndSxService 
{
    @Autowired
    private CpAndSxMapper cpAndSxMapper;


    /**
     * 查询产品与属性
     * 
     * @param cpSxId 产品与属性主键
     * @return 产品与属性
     */
    @Override
    public CpAndSx selectCpAndSxByCpSxId(Long cpSxId)
    {
        return cpAndSxMapper.selectCpAndSxByCpSxId(cpSxId);
    }

    /**
     * 查询产品与属性列表
     * 
     * @param cpAndSx 产品与属性
     * @return 产品与属性
     */
    @Override
    public List<CpAndSx> selectCpAndSxList(CpAndSx cpAndSx)
    {
        return cpAndSxMapper.selectCpAndSxList(cpAndSx);
    }

    /**
     * 新增产品与属性
     * 
     * @param cpAndSx 产品与属性
     * @return 结果
     */
    @Override
    public int insertCpAndSx(CpAndSx cpAndSx)
    {
        return cpAndSxMapper.insertCpAndSx(cpAndSx);
    }

    /**
     * 修改产品与属性
     * 
     * @param cpAndSx 产品与属性
     * @return 结果
     */
    @Override
    public int updateCpAndSx(CpAndSx cpAndSx)
    {
        return cpAndSxMapper.updateCpAndSx(cpAndSx);
    }

    /**
     * 批量删除产品与属性
     * 
     * @param cpSxIds 需要删除的产品与属性主键
     * @return 结果
     */
    @Override
    public int deleteCpAndSxByCpSxIds(Long[] cpSxIds)
    {
        return cpAndSxMapper.deleteCpAndSxByCpSxIds(cpSxIds);
    }

    /**
     * 删除产品与属性信息
     * 
     * @param cpSxId 产品与属性主键
     * @return 结果
     */
    @Override
    public int deleteCpAndSxByCpSxId(Long cpSxId)
    {
        return cpAndSxMapper.deleteCpAndSxByCpSxId(cpSxId);
    }
}
